import React from 'react';
import '../../asset/css/merchantInfo/cart.css'
class Cart extends React.Component{
  render(){
      console.log(this.props)
      let {totalPrice,GoCart,pro}=this.props
    return(
        <div className="cart">
            <div className="cart_icon">
            {/* className={totalPrice?changebg:''} */}
                <span style={{background:totalPrice?"rgb(35, 149, 255)":"#666"}}>
                {totalPrice?<img src={require('../../asset/icon/gouwuche3.png')} alt="购物车"/>
                :<img src={require('../../asset/icon/gouwuche.png')} alt="购物车"/>}
                </span>
            </div>
            <div className="cart_choose">
                {totalPrice? <p>￥{totalPrice}</p>:<p className="noChoose">未添加商品</p>}
            </div>
            <div className="cart_dispatch" >
                {totalPrice?<p onClick={()=>GoCart(pro)}>生成订单</p>:<span>￥0起送</span>}
               
            </div>
        </div>
       
    )
  }
}

export default Cart;
// import HomePage from '../home/homePage'
// import  Shopdetailed from '../../container/merchantInfo/shopDetaile'
// import Order from '../../container/merchantInfo/order'
// import Mine from "../mine/mine"